Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UidGenerator for stable UID generation across projects #1

Closed
wants to merge 1 commit into from

Conversation

rbuckton
Copy link
Owner

No description provided.

@@ -18,6 +19,7 @@
{
"kind": "Function",
"canonicalReference": "(ambientNameConflict:0)",
"uid": "api-extractor-scenarios/ambientNameConflict(Promise`1{void},api-extractor-scenarios/Promise`1{void})",
Copy link
Collaborator

@octogonz octogonz Jun 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This UID refers to Promise, which is an ambient type picked up from the global context, which may be different for each invocation of the compiler. In this case it's probably the compiler's built-in type, but e.g. it could also be the React or Jest global variable. It seems imprecise for the UID to depend on definitions that are external to the API surface.

Also, I'd be curious to see what the output would be for a complex type like microsoft#1331 (comment), since people really do write code like that in practice.

And what the corresponding URL would be, given that URLs need to be case-insensitive.

It might be more efficient to chat about this offline, but as desirable as stable UIDs are, I'm really not convinced that it's appropriate for TypeScript.

@octogonz
Copy link
Collaborator

Here's a commit with some more test cases:
microsoft@df26c9e

(I don't have permissions to push to your PR branch here.)

@rbuckton
Copy link
Owner Author

See microsoft#1337

@rbuckton rbuckton closed this Jun 24, 2019
rbuckton pushed a commit that referenced this pull request Aug 25, 2019
rbuckton pushed a commit that referenced this pull request Sep 21, 2019
Fix a few issues with rush change when rush.json isn't in the repo root.
rbuckton pushed a commit that referenced this pull request Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants